<template>
    <div>

        <!-- 轮播图区    isfull使用向子组件轮播图传递参数的。在子组件轮播图中props接收 -->
        <swiper :swipedata="swipedata" :isfull="true"></swiper>
        <!-- content区 -->
		        <ul class="mui-table-view mui-grid-view mui-grid-9">
		            <li class="mui-table-view-cell mui-media mui-col-xs-4"><router-link to="/login/newlist">
		                    <span class="mui-icon mui-icon-home"></span>
		                    <div class="mui-media-body">Home</div></router-link></li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4"><router-link to="/login/images">
		                    <span class="mui-icon mui-icon-email"><span class="mui-badge">0</span></span>
		                    <div class="mui-media-body">Email</div></router-link></li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4"><router-link to="/login/goods">
		                    <span class="mui-icon mui-icon-chatbubble"></span>
		                    <div class="mui-media-body">Chat</div></router-link></li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4"><a href="#">
		                    <span class="mui-icon mui-icon-location"></span>
		                    <div class="mui-media-body">location</div></a></li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4"><a href="#">
		                    <span class="mui-icon mui-icon-search"></span>
		                    <div class="mui-media-body">Search</div></a></li>
		            <li class="mui-table-view-cell mui-media mui-col-xs-4"><a href="#">
		                    <span class="mui-icon mui-icon-phone"></span>
		                    <div class="mui-media-body">Phone</div></a></li>
		        </ul> 

    </div>
</template>
<script>
import { Toast } from 'mint-ui';
import swiper from '../swipers/swiper.vue'
export default {
    data() {
        return {
            swipedata: []
        }
    },
    created() {
        this.show()
    },
    methods: {
        show() {
            // 获取轮播图图片
            this.$http.get("api/getlunbo").then(function(res) {
                // console.log(res.body);
                // 如果请求成功
                if (res.body.status === 0) {
                    this.swipedata = res.body.message
                }else {
                    Toast('请求失败')
                }
            },
            // function() {
            //     // console.log('请求失败');
            //     Toast({
            //         message: '轮播图请求失败',
            //         position: 'top',
            //         duration: 3000
            //         });
            // }
            )
        }
    },
    components: {
        swiper
    }
}
</script>
<style lang="scss" scoped>

.mui-grid-view.mui-grid-9 {
    background-color: #fff;
    border: 0;
}
.mui-grid-view.mui-grid-9 .mui-table-view-cell {
    border: 0;
}   
</style>